<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <title></title>
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/public.css" />
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/Teacher/TeachersignIn.css" />
    </head>
    <style type="text/css">
        @media only screen and (min-width: 100px) and (max-width: 370px) {
            body > form > ul > li{
    position: relative;
    width: 18.2%;
    height: 4rem;
    border: 1px solid #D4D4D4;
    display: inline-block;
}
        }
    </style>
    <body>

        <a href="{:U('Home/Public/person')}" id="home" style="bottom: 6rem;">
        <!--移动端小房子的跳转位置-->
            <img src="__PUBLIC__/home/img/index/home.png" />
        </a>
        <p>每日签到</p>
        <form action="{:U('Index/add')}" method="post">
            <ul>
            <foreach name ="typelist" item="vo">
                <li>
                    <p>{$vo.nickname}
                        <input type="hidden"  name="asd[]" value="{$vo.uid}"/>
                        <input type="hidden"  name="unit" value="{$vo.unit_id}"/>
                        <input type="hidden"  name="class_id" value="{$vo.class_id}"/>
                    </p>
                    <if condition="$vo.type neq null ">
                        <if condition="$vo.type eq '1'">
                            <img src="__PUBLIC__/home/img/Teacher/zy.png" class="a" style="display: inline-block;" />
                            
                        </if>
                        <if condition="$vo.type eq '55'">
                            <img src="__PUBLIC__/home/img/Teacher/b.png" class="b" style="display: inline-block; z-index: 999; background: #fff;" />
                            
                            
                        </if>

                        <if condition="$vo.type eq '58'">
                            <img src="__PUBLIC__/home/img/Teacher/s.png" class="c" style="display: inline-block; z-index: 999; background: #fff;" />
                           
                        </if>
                        <if condition="$vo.type eq '64'">
                            <img src="__PUBLIC__/home/img/Teacher/q.png" class="d" style="display: inline-block; z-index: 999; background: #fff;" />

                        </if>
                    <else />
                        <select name="names[]" onchange="qd (this)">
                            <option value="1">出勤</option>
                            <option value="0">病假</option>
                            <option value="2">事假</option>
                            <option value="3">其他</option>
                        </select>
                    </if>

                    <img src="__PUBLIC__/home/img/Teacher/zy.png" class="a"/>
                    <img src="__PUBLIC__/home/img/Teacher/b.png" class="b" />
                    <img src="__PUBLIC__/home/img/Teacher/s.png" class="c" />
                    <img src="__PUBLIC__/home/img/Teacher/q.png" class="d" />
                </li>
            </foreach>    
                <div><span>注：</span><img src="__PUBLIC__/home/img/Teacher/zy.png" /><span>宝宝出勤</span><img src="__PUBLIC__/home/img/Teacher/zg.png" /><span>宝宝缺勤</span></div>
            </ul>
            <input type="hidden" name="sumcount" value="{$sumcount}" />
            <if condition="$_SESSION['oc_home']['astate'] neq null ">
                <input type="submit" name="{$atten}" onclick="javascript:if(confirm('您今天已经考勤，确认重复考勤吗?')){return true;}else{return false;}" value="提&nbsp;交"/>
            <else/>
                <input type="submit" onclick="javascript:if(confirm('确定提交吗')){return true}else{return false}" value="提&nbsp;交"/>
            </if>
            
        </form>

    </body>
    <script src="__PUBLIC__/home/js/jquery-2.1.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__PUBLIC__/home/js/font.js" type="text/javascript" charset="utf-8"></script>

    <script type="text/javascript">

        function qd(obj) {
            if($("option:selected", obj).val() == "1") {
                // console.log("1");
                $(obj).parent().children("img.a").show();
                $(obj).parent().children("img.b,img.c,img.d").hide();
            }
            if($("option:selected", obj).val() == "0") {
                // console.log("2");
                $(obj).parent().children("img.b").show();
                $(obj).parent().children("img.a,img.c,img.d").hide();
            }
            if($("option:selected", obj).val() == "2") {
                // console.log("3");
                $(obj).parent().children("img.c").show();
                $(obj).parent().children("img.b,img.a,img.d").hide();
            }
            if($("option:selected", obj).val() == "3") {
                // console.log("4");
                $(obj).parent().children("img.d").show();
                $(obj).parent().children("img.b,img.c,img.a").hide();
            }
        }
    </script>

</html>